﻿using System;
using System.Collections.Generic;

namespace Terraria
{
	// Token: 0x02000045 RID: 69
	public class RecipeGroup
	{
		// Token: 0x0600069E RID: 1694 RVA: 0x0000923B File Offset: 0x0000743B
		public RecipeGroup(Func<string> getName, params int[] validItems)
		{
			this.GetText = getName;
			this.ValidItems = new List<int>(validItems);
		}

		// Token: 0x0600069F RID: 1695 RVA: 0x00369AE0 File Offset: 0x00367CE0
		public static int RegisterGroup(string name, RecipeGroup rec)
		{
			int num = RecipeGroup.nextRecipeGroupIndex++;
			RecipeGroup.recipeGroups.Add(num, rec);
			RecipeGroup.recipeGroupIDs.Add(name, num);
			return num;
		}

		// Token: 0x060006A0 RID: 1696 RVA: 0x00009256 File Offset: 0x00007456
		public bool ContainsItem(int type)
		{
			if (this.ValidItemsLookup == null)
			{
				return this.ValidItems.Contains(type);
			}
			return this.ValidItemsLookup[type];
		}

		// Token: 0x04000CA3 RID: 3235
		public Func<string> GetText;

		// Token: 0x04000CA4 RID: 3236
		public List<int> ValidItems;

		// Token: 0x04000CA5 RID: 3237
		public int IconicItemIndex;

		// Token: 0x04000CA6 RID: 3238
		internal bool[] ValidItemsLookup;

		// Token: 0x04000CA7 RID: 3239
		public static Dictionary<int, RecipeGroup> recipeGroups = new Dictionary<int, RecipeGroup>();

		// Token: 0x04000CA8 RID: 3240
		public static Dictionary<string, int> recipeGroupIDs = new Dictionary<string, int>();

		// Token: 0x04000CA9 RID: 3241
		public static int nextRecipeGroupIndex = 0;
	}
}
